<template>
  <div>测试vue3知识点</div>
  <div>
    <input v-focus />
    <image src="" mode="scaleToFill" />
    <button @click="helloWorld">Say Hello</button>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import { getCurrentInstance } from 'vue'
// v-lazy="lazyUrl1"
// const lazyUrl1 = ref('123')
const vFocus = {
  mouted: (el) => {
    el.focus()

    console.log('元素被聚焦了', el)
  },
}
const instance = getCurrentInstance()
const helloWorld = () => {
  // window.$HelloWorld()
  instance.appContext.config.globalProperties.$helloWorld()
}
</script>

<style lang="scss" scoped>
</style>
